package com.jilian.powerstation.modul.natives;

import java.util.Calendar;

public class Test {
    public static void main(String[] args) {
        //数据单元
        Calendar ca = Calendar.getInstance();
//        //年 19年
//        contentByte[24] = (byte)0x13;
//        //月
//        contentByte[25]= DataUtils.HexToByte(DataUtils.IntToHex(ca.get(Calendar.MONTH)+1));
//        //日
//        contentByte[26]=DataUtils.HexToByte(DataUtils.IntToHex(ca.get(Calendar.DAY_OF_MONTH)));
//        //时
//        contentByte[27]=DataUtils.HexToByte(DataUtils.IntToHex(ca.get(Calendar.HOUR_OF_DAY)));
//        //分
//        contentByte[28]=DataUtils.HexToByte(DataUtils.IntToHex(ca.get(Calendar.MINUTE)));
//        //秒
//        contentByte[29]=DataUtils.HexToByte(DataUtils.IntToHex(ca.get(Calendar.SECOND)));

        System.out.println(Integer.parseInt(String.valueOf(ca.get(Calendar.YEAR)).substring(2)));
        System.out.println(ca.get(Calendar.MONTH)+1);
        System.out.println(ca.get(Calendar.DAY_OF_MONTH));
        System.out.println(ca.get(Calendar.HOUR_OF_DAY));
        System.out.println(ca.get(Calendar.MINUTE));
        System.out.println(ca.get(Calendar.SECOND));
    }
}
